import request from './request.js'

const api = {
	// 基础服务：登录登出、身份信息
	baseUrl: request.baseUrl,

	change_trade_password: (params = {}) => request.post('/change_trade_password', params), //修改交易密码			√
	openManList: (params = {}) => request.post('/open/service/get', params), //获取联系人列表(不需要登录)
	ping2: (params = {}) => request.post('/ping2', params), //查看是否登录
	login: (params = {}) => request.post('/signin', params), //登录									√
	logout: (params = {}) => request.post('/signout', params), //退出登录							√
	saveRegByValidCode: (params = {}) => request.post('/signup2', params), //注册账户	手机验证码		√
	saveRegByValidCode3: (params = {}) => request.post('/signup3', params), //注册账户	图像验证码			√
	linkmanList: (params = {}) => request.post('/user/service/get', params), //获取联系人列表
	changePassword: (params = {}) => request.post('/change_password', params), //修改密码	
	resetPassword: (params = {}) => request.post('/reset_password', params), //修改密码			√
	privacy: (params = {}) => request.post('/open/setting/get ', params), //隐私政策		√
	bankUpdate: (params = {}) => request.post('/user/bank/update', params), //绑定银行卡				√
	bankUpdate2: (params = {}) => request.post('/user/bank/bind', params), //绑定银行卡 加验证码
	imgupload: (params = {}) => request.post('/user/withdraw/imgupload', params), //提交图片上传的名称
	// 这个是不需要登录就可以用的，传 key:'pagetext_privacy'↑↑
	getSms: (params = {}) => request.post('/sms/send', params), //获取短信验证码
	// 首页
	signinList: (params = {}) => request.get('/user/signin/get', params), //获取签到列表
	signiOn: (params = {}) => request.post('/user/signin/sign', params), //开始签到
	newsList: (params = {}) => request.post('/user/news/list/get', params), //获取新闻列表				
	newsDetails: (params = {}) => request.post('/user/news/get', params), //获取新闻详情				
	bannerList: (params = {}) => request.post('/user/setting/get', params), //获取轮播图片				

	getSMT: (params = {}) => request.post(
		`/user/setting/get2/${params.indexOf('pagetext') != -1?params + '_en': params}`), //获取轮播图片    √
	NoticeList: (params = {}) => request.post('/user/news/get', params), //获取公告			    
	// 财务页面
	userGet: (params = {}) => request.post('/user/get', params), //获取个人详细信息					
	rewardGets: (params = {}) => request.post('/user/team/reward/take', params), //提现（返利和返佣)// 提现 v=1 返利，2返佣


	//↓  team/get 增加俩参数 chargeInvestRewardTakeCount 表示已领取次数, minChargeAndInvestCount 表示总次数，可领取次数减一下就行了
	investTake: (params = {}) => request.post('/user/team/member_charge_invest_reward/take', params), //领取接口
	//↑邀请的1级充值+投资可以获得100，现在是每天只能领取一次 改为次次送。只要有人充值就可以领取1次↑

	taskUpload: (params = {}) => request.post('/user/task/upload', params), //提交审核任务

	tradeHistory: (params = {}) => request.post('/user/trade_history', params), //财务记录滚屏
	productList: (params = {}) => request.post('/user/item/getall', params), //商品列表				
	productDetails: (params = {}) => request.post('/user/item/get', params), //商品详情
	buyOn: (params = {}) => request.post('/user/item/buy', params), //购买商品		
	buyOn2: (params = {}) => request.post('/user/item/buy2', params), //购买多件商品						
	couponsList: (params = {}) => request.post('/user/coupons/list', params), //购买商品						
	currencyList: (params = {}) => request.post('/user/currency/list', params), //资金流水			
	//1charge 2sign up 3invite_memeber 4invest_reward  ↑ ↑ ↑ ↑
	//5rebate_fee 6withdrawal  //7+8 unknown
	//9withdrawal_error //10 invest  //11withdrawal_error
	//12turntable //13invite_charge //14gift
	withdrawalList: (params = {}) => request.post('/user/withdrawal/list', params), //提现记录
	//0/1是处理中，2是完成，3是失败  ↑ ↑ ↑ ↑
	// 我的设备列表根据state做类型切换， 0 有效其他到期 ↓  ↓  ↓  ↓  ↓ 
	myProductList: (params = {}) => request.post('/user/item/getall/full', params), //我的商品列表
	chargeList: (params = {}) => request.post('/user/charge/get', params), //快捷充值数字				
	chargeChannel: (params = {}) => request.post('/user/charge/channel/get', params), //充值方式		
	chargeSett: (params = {}) => request.post('/user/setting/get', params.key.indexOf('pagetext') != -1 ? {
		key: params.key + '_en'
	} : params), //充值说明(后台上传内容)		√
	withdrawTo: (params = {}) => request.post('/user/withdraw/do', params), //提现					
	withdrawList: (params = {}) => request.post('/user/withdrawal/list', params), //提现	记录
	// 0/1是处理中，2是完成，3是失败
	rewardWithdraw: (params = {}) => request.post('/user/item/reward/get', params), //我的设备提现
	// {id: 1} 我的设备中字段canReward>0可以提现 ↑ ↑ ↑ ↑ ↑ ↑	
	commGet: (params = {}) => request.post('/user/team/comm/get', params), //我的邀请分级显示
	commTake: (params = {}) => request.post('/user/team/comm/take', params), //我的邀请分级显示
	onerebate: (params = {}) => request.post('/user/team/onerebate/get', params), //邀请投资
	onerebateTake: (params = {}) => request.post('/user/team/onerebate/take', params), //领取投资奖励
	hour_list: (params = {}) => request.post('/user/equorder/list', params), //每小时收益明细
	notification: (params = {}) => request.post('/user/notification/list/get', params), //新闻列表
	giftSet: (params = {}) => request.post('/user/gift/get', params), //兑换礼物
	turntableList: (params = {}) => request.post('/user/turntable/list', params), //抽奖的礼品列表
	turntableRandom: (params = {}) => request.post('/user/turntable/random', params), //开始抽奖
	turntabletask: (params = {}) => request.post('/user/turntabletask/list', params), //转盘任务信息
	inviteTake: (params = {}) => request.post('/user/team/invite/take', params),
	//inviteTake-邀请好友注册奖励领取
	//teamGet中已领取takeInviteRewardCount 最多领取人数inviteRewardMaxCount 领取值inviteRewardValue
	teamGet: (params = {}) => request.post('/user/team/get', params), //团队Team				√

	//邀请投资爬坡奖励 第一个元素是ID，第二个是人数，第三个是奖金   第四个元素0表示无法领取，1表示可以领取，2表示已领取  第五代表当前已累计
	// type 1 邀请累计充值   3 邀请累计投资   4 每日邀请注册  5 邀请累计注册  6每日充值  7跳频道奖励
	taskList: (params = {}) => request.post('/user/task/list', params), //邀请投资爬坡奖励
	taskTake: (params = {}) => request.post('/user/task/take', params), //领取爬坡任务奖励
	inviteList: (params = {}) => request.post('/user/invite/list', params), //获取邀请分等级奖励列表
	inviteTakeTo: (params = {}) => request.post('/user/invite/take', params), //获取邀请分等级奖励列表
	levelGet: (params = {}) => request.post('/user/team/list/get', params), //获取邀请分等级奖励列表
	dailyWage: (params = {}) => request.post('/user/dailywage/list', params), //获取日薪详情
	dailyWageTake: (params = {}) => request.post('/user/dailywage/take', params), //领取日薪详情
	//参数 origins 和账单一样，是个数组， beginTime，可选参数，查询开始时间的时间戳beginTime不传就是查全部，传了就是这个时间点往后的
	currencySun: (params = {}) => request.post('/user/currency/sum', params), //查收益

	// 分享与团队页面
	leveltake: (params = {}) => request.post('/user/team/rebate/take', params), //团队分级奖励和获取参数level值是123
	memberAll: (params = {}) => request.post('/user/team/list/get/page',
		params), //获取全部团队人数 level不穿查全部 page pageSize
	// 会员finance
	vipList: (params = {}) => request.post('/user/vip/list', params), //获取vip等级
	financeGetall: (params = {}) => request.post('/user/finance/getall', params), //获取定期理财商品
	financeDetails: (params = {}) => request.post('/user/finance/get', params), //定期商品详情
	financeBuy: (params = {}) => request.post('/user/finance/buy', params), //购买定期商品
	myFinanceList: (params = {}) => request.post('/user/finance/getlist', params), //我的理财列表
	rewardFinance: (params = {}) => request.post('/user/finance/reward/get', params), //领取理财

	// 瓜分红包
	inviteshareActive: (params = {}) => request.post('/user/activity/inviteshare/active',
		params), //激活红包
	inviteshareGet: (params = {}) => request.post('/user/activity/inviteshare/get',
		params), //获取红包状态进度
	inviteshareTake: (params = {}) => request.post('/user/activity/inviteshare/take',
		params), //领取红包
	//迷雾任务
	rechargetask: (params = {}) => request.post('/user/rechargetask/get',
		params), // 获取这个任务的详情
	rechargetaskTake: (params = {}) => request.post('/user/rechargetask/take',
		params), // 领取
	taskFinished: (params = {}) => request.post('/user/task/finished', params), //已完成的任务id集合
	checkBatch: (params = {}) => request.post('/user/task/check/batch', params), //查看任务状态
	checkBatch2: (params = {}) => request.post('/user/task/check/batch2', params), //查看任务状态(更详细)
	takeMoreTask: (params = {}) => request.post('/user/task/take/batch', params), //批量领取  任务包放最后
}
export default api